<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<style>
    .message {
        color: red;
    }
</style>
<script type="text/javascript">
    $(function () {
        initSelect(false, "#departlist", ${departList}, false, ${user.departId==null?-1:user.departId});
        initSelect(false, "#collegeList", ${collegeList}, false, ${user.collegeId==null?-1:user.collegeId});
        initSelect(false, "#majorList", ${majorList}, false, ${user.majorId==null?-1:user.majorId});
        initSelect(false, "#roleList", ${roleList}, false, ${user.roleId==null?-1:user.roleId});
    });

</script>
<form action="user/updateSubmit.shtml" class="pageForm" id="addForm"
      data-toggle="validate" data-callback="doAjaxCallBackForDialog"
      method="post" data-toggle="ajaxform">
    <div class="bjui-pageContent">
        <div class="row" id="editEia" style="margin: 10px 10px;">
            <div class="panel panel-default">
                <div class="panel-heading" align="center">编辑文件信息</div>
                <div class="panel-body">
                    <input type="hidden" name="id" value="${user.id}"/>
                    <input type="hidden" name="statu" value="${user.statu}"/>
                    <input type="hidden" name="password" value="${user.password}"/>
                    <table class="table table-condensed table-hover">
                        <tbody>
                        <tr>
                            <td><label class="control-label x180">学号：</label></td>
                            <td><input type="text" name="no" value="${user.no}" readonly></td>
                            <td><label class="control-label x180">姓名：</label></td>
                            <td><input type="text" name="name" value="${user.name}"></td>
                        </tr>
                        <tr style="${sessionScope.user_session_key.no==user.no?'display:none;':''}">
                            <td><label class="control-label x180">部门：</label></td>
                            <td>
                                <select name="departId" id="departlist" data-width="210"
                                        class="form-control" data-toggle="selectpicker"
                                        data-size="10" readonly=true>
                                </select><span class="message">*</span>
                            </td>
                            <td><label class="control-label x180">角色：</label></td>
                            <td>
                                <select name="roleId" data-width="210" id="roleList"
                                        class="form-control" data-toggle="selectpicker" data-size="10" readonly>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td><label class="control-label x180">院（系）：</label></td>
                            <td>
                                <select name="collegeId" data-width="210" id="collegeList"
                                        class="form-control" data-toggle="selectpicker" data-size="10">
                                </select>
                            </td>
                            <td><label class="control-label x180">专业：</label></td>
                            <td>
                                <select name="majorId" data-width="210" id="majorList"
                                        class="form-control" data-toggle="selectpicker" data-size="10">
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td><label class="control-label x180">班级：</label></td>
                            <td>
                                <input type="text" name="banji" class="textChange" value="${user.banji}"/>
                            </td>
                            <td><label class="control-label x180">邮箱：</label></td>
                            <td>
                                <input type="text" name="email" class="textChange" value="${user.email}"
                                       data-rule="email;length[~40]"/>
                            </td>
                        </tr>
                        <tr>
                            <td><label class="control-label x180">电话：</label></td>
                            <td>
                                <input type="text" name="phone" class="textChange" value="${user.phone}"/>
                            </td>
                        </tr>
                        <tr>
                            <td><label class="control-label x180">备注：</label></td>
                            <td colspan="3">
                            <textarea cols="60" data-rule="length[~50]"
                                      placeholder="请输入50字以内的字符" name="remark">${user.remark}</textarea>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <ul id="filename2" style="font-size: 16px;display:inline;">
                                </ul>
                            </td>
                        </tr>
                        <%--<tr>
                            <td ></td>
                            <td colspan="3">
                                <div style="float: right">
                                    <input type="hidden" id="affixNo" name="image"/>
                                    <div id="fileUpload" data-toggle="upload" style="display: inline;"></div>
                                    <span style="color: #BFBFBF;">文件类型可为docx、xlsx、png、jpeg、jpg,大小不超过1M,文件名不超过30个字。</span>
                                </div>
                            </td>

                        </tr>--%>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="bjui-pageFooter">
        <ul>
            <li>
                <button type="submit" class="btn-primary">保存</button>
            </li>
            <li>
                <button type="button" class="btn-close">关闭</button>
            </li>
        </ul>
    </div>
</form>
